(DEFUN chkctabname ( / ctab-str-list)
  (IF check_for_doslib NIL (LOAD "CHECK_FOR_DOSLIB" "\nFile CHECK_FOR_DOSLIB.LSP not loaded! "))
  (check_for_doslib)
  (IF (WCMATCH (GETVAR "CTAB") "*[`@`.`#]*");fix CTAB name if it contains wildcard characters
    (COND
      ((WCMATCH (GETVAR "CTAB") "*`@*")
       (SETQ ctab-str-list (DOS_STRTOKENS (GETVAR "CTAB") "`@"))
       (SETQ ctab-name (STRCAT (CAR ctab-str-list) "`@" (CADR ctab-str-list))))
      ((WCMATCH (GETVAR "CTAB") "*`.*")
       (SETQ ctab-str-list (DOS_STRTOKENS (GETVAR "CTAB") "`."))
       (SETQ ctab-name (STRCAT (CAR ctab-str-list) "`." (CADR ctab-str-list))))
      ((WCMATCH (GETVAR "CTAB") "*`#*")
       (SETQ ctab-str-list (DOS_STRTOKENS (GETVAR "CTAB") "`#"))
       (SETQ ctab-name (STRCAT (CAR ctab-str-list) "`#" (CADR ctab-str-list))))
    )
    (SETQ ctab-name (GETVAR "CTAB"))
  )
)
